import request from '@/utils/request/req';

// 查询接管配置列表
export function getTakeoverList(params: { wxId?: string; aiModelId?: number; isFile?: string; chatMode?: string; fendLabel?: string; accountType?: string }) {
  return request({
    url: '/msg/takeover/list',
    method: 'get',
    params
  });
}

// 新增接管配置
export function addTakeover(data: { wxId: string; aiModelId: number; isFile: string; chatMode: string; fendLabel: string; accountType: string }) {
  return request({
    url: '/msg/takeover/add',
    method: 'post',
    data
  });
}

// 修改接管配置
export function updateTakeover(data: {
  id: number;
  wxId: string;
  aiModelId: number;
  isFile: string;
  chatMode: string;
  fendLabel: string;
  accountType: string;
  userList?: string;
}) {
  return request({
    url: '/msg/takeover/update',
    method: 'post',
    data
  });
}
